<template>
  <div class="contentContainer">
    <route-view/>
    <!--      <find-music ref="findMusic" v-show="findMusicVisible"></find-music>-->
    <!--      <search-result ref="searchResult" v-show="searchResultVisible"></search-result>-->
    <!--      <playlist-detail ref="playListDetail" v-show="playListDetailVisible" :play-list-id="playListId"></playlist-detail>-->
  </div>
</template>

<script>
import RouteView from "@/components/web/router/RouteView";

export default {
  name: "Content",
  components: {RouteView},
  data() {
    return {
      findMusicVisible: true, // 发现音乐
      searchResultVisible: false, // 搜索结果
      playListDetailVisible: false, // 歌单详情
      playListId: 0,

    }
  },
  mounted() {
    this.$router.push("/findMusic")
  },
  methods: {
    showSearchResult() {
      this.searchResultVisible = true;
      this.findMusicVisible = false;
      this.playListDetailVisible = false;
      this.$refs.searchResult.handleSearchResult();
    },
    contentSwitch(contentType, contentId) {
      if (contentType == 'playListDetail') { // 是歌单详情
        this.playListId = contentId;
        this.playListDetailVisible = true;
        this.searchResultVisible = false;
        this.findMusicVisible = false;
        this.$refs.playListDetail.getPlayListDetail(contentId);
      }
    }
  }
}
</script>

<style scoped>
.contentContainer {
  background-color: white;
  padding: 1rem;
  height: 24rem;
  background-color: white;
  overflow-x: hidden;
  overflow-y: scroll !important;
}

/* 滚动条样式*/
.contentContainer::-webkit-scrollbar {
  width: 7px;
  height: 5px;
}

/*滚动条里面小方块*/
.contentContainer::-webkit-scrollbar-thumb {
  background: #e8e8e8;
  border-radius: 5px;
}

/*滚动条里面轨道*/
.contentContainer::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.2);
  background: #ffffff !important;
}


</style>
